home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacApp Release 10 / MacApp Release 10 - HD Ready / Libraries / Framework / Includes / UDrawingEnvironment.h < prev    next >
Encoding:
Text File  |  1996-04-03  |  1.6 KB  |  77 lines  |  [TEXT/MPS ]

  1. // UDrawingEnvironment.h
  2. //  Copyright © 1984-96 by Apple Computer, Inc. All rights reserved.
  3.  
  4. #ifndef __UDRAWINGENVIRONMENT__
  5. #define __UDRAWINGENVIRONMENT__
  6.  
  7. // MacApp
  8.  
  9. #ifndef __GEOMETRY__
  10. #include "Geometry.h"
  11. #endif
  12.  
  13. #ifndef __TOOLBOX__
  14. #include "Toolbox.h"
  15. #endif
  16.  
  17. #ifndef __UOBJECT__
  18. #include "UObject.h"
  19. #endif
  20.  
  21. // Toolbox
  22.  
  23. #ifndef __QUICKDRAW__
  24. #include <Quickdraw.h>
  25. #endif
  26.  
  27.  
  28. //----------------------------------------------------------------------------------------
  29. // TDrawingEnvironment
  30. //----------------------------------------------------------------------------------------
  31.  
  32. class TDrawingEnvironment : public TObject
  33. {
  34.     MA_DECLARE_CLASS;
  35.     
  36. public:
  37.     TDrawingEnvironment();
  38.         // Constructor
  39.     virtual ~TDrawingEnvironment();
  40.         // Destructor
  41.  
  42.     void IDrawingEnvironment();    
  43.  
  44.     virtual GrafPtr GetGrafPort();
  45.         // Returns a pointer to our Graf Port.
  46.  
  47.     virtual void Prepare();
  48.  
  49.     virtual void Setup();
  50.  
  51.     virtual void Complete();
  52.     
  53.     //------------------------------------------------------------------------------------
  54.     // Stream I/O protocol support.
  55.     //------------------------------------------------------------------------------------
  56.  
  57.     virtual void ReadFrom(TStream* aStream);
  58.     
  59.     virtual void WriteTo(TStream* aStream);
  60.  
  61.     //------------------------------------------------------------------------------------
  62.     // data members
  63.     //------------------------------------------------------------------------------------
  64. public:
  65.     PenState    fSavedPenState;
  66.     CRGBColor    fForegroundColor;    
  67.     CRGBColor    fBackgroundColor;    
  68.     CRGBColor    fSavedForegroundColor;    
  69.     CRGBColor    fSavedBackgroundColor;    
  70.     Pattern        fPenPattern;
  71.     CPoint        fPenSize;
  72.     short        fPenMode;    
  73.     
  74. };
  75.  
  76. #endif
  77.